import { uniFetch } from './uni-fetch.js'

export const login = (data) => {
  if (!data.account || !data.password) return
  return uniFetch.post('/driver/login/account', data)
}

// 获取个人信息
export const profile = () => {
  return uniFetch.get('/driver/users')
}
//获取任务信息
export const task = (year, month) => {
  return uniFetch.get('/driver/users/taskReport', { year, month })
}

// 获取车辆详情
export const truck = () => {
  return uniFetch.get('/driver/users/truck')
}
